#if !defined(AFX_WGNUPLOTCTL_H__F468819F_2606_4B6A_8A14_B73AAD161873__INCLUDED_)
#define AFX_WGNUPLOTCTL_H__F468819F_2606_4B6A_8A14_B73AAD161873__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

// WgnuplotCtl.h : Declaration of the CWgnuplotCtrl ActiveX Control class.
#include "stdafx.h"

#include "src/win/wgnuplib.h"
#include "GraphWnd.h"

extern GW graphwin;
/////////////////////////////////////////////////////////////////////////////
// CWgnuplotCtrl : See WgnuplotCtl.cpp for implementation.

class CWgnuplotCtrl : public COleControl
{
	DECLARE_DYNCREATE(CWgnuplotCtrl)

// Constructor
public:
	CWgnuplotCtrl();

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CWgnuplotCtrl)
	public:
	virtual void OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
	virtual void DoPropExchange(CPropExchange* pPX);
	virtual void OnResetState();
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	//}}AFX_VIRTUAL

// Implementation
protected:
	~CWgnuplotCtrl();

	DECLARE_OLECREATE_EX(CWgnuplotCtrl)    // Class factory and guid
	DECLARE_OLETYPELIB(CWgnuplotCtrl)      // GetTypeInfo
	DECLARE_PROPPAGEIDS(CWgnuplotCtrl)     // Property page IDs
	DECLARE_OLECTLTYPE(CWgnuplotCtrl)		// Type name and misc status


// Message maps
	//{{AFX_MSG(CWgnuplotCtrl)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg int OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message);
	afx_msg void OnSetFocus(CWnd* pOldWnd);
	afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

// Dispatch maps
	//{{AFX_DISPATCH(CWgnuplotCtrl)
	afx_msg BOOL Open(LPCTSTR pszFilePath);
	afx_msg BOOL Redraw();
	afx_msg BOOL ClearGraphOp();
	afx_msg BOOL Fit();
	afx_msg BOOL ToggleGrid();
	//}}AFX_DISPATCH
	DECLARE_DISPATCH_MAP()

	afx_msg void AboutBox();

// Event maps
	//{{AFX_EVENT(CWgnuplotCtrl)
	//}}AFX_EVENT
	DECLARE_EVENT_MAP()

	CGraphWnd m_graphWnd;
// Dispatch and event IDs
public:
	void StorePen(LPGW lpgw, int i, COLORREF ref, int colorstyle, int monostyle);
	void ReadGraphIni(LPGW lpgw);
	static CWgnuplotCtrl* GetInstance();
	void GraphInit( LPGW lpgw );
	enum {
	//{{AFX_DISP_ID(CWgnuplotCtrl)
	dispidOpen = 1L,
	dispidRedraw = 2L,
	dispidClearGraphOp = 3L,
	dispidFit = 4L,
	dispidToggleGrid = 5L,
	//}}AFX_DISP_ID
	};
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_WGNUPLOTCTL_H__F468819F_2606_4B6A_8A14_B73AAD161873__INCLUDED)
